﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SiyinPractice.Interface.ProjectManagement.ProjectManage;
using SiyinPractice.Shared.ProjectManagement.Dto.ProjectManage.WXMsg;
using SiyinPractice.Web.Core.BaseControllers;
using System.Threading.Tasks;

namespace SiyinPractice.Web.Host.Controllers.ProjectManagement.ProjectManage
{
    [Route("maint/DingDing")]
    [ApiController]
    [Authorize]
    public class DingDingController : NamedEntityCRUDController<IDingDingService, DingDingDto, DingDingSearchPagedDto, CreateDingDingDto>
    {
        public DingDingController(IDingDingService entityService) : base(entityService)
        {
        }

        [HttpGet]
        [Route("GetParentSetting")]
        public virtual Task<DingDingDto> GetParentSetting()
        {
            return EntityService.GetParentSetting();
        }

        [HttpPost]
        [Route("ParentSetting")]
        public virtual Task<int> ParentSetting(DingDingDto createInput)
        {
            return EntityService.ParentSetting(createInput);
        }
    }
}